<?php /* Smarty version Smarty-3.1.8, created on 2012-03-19 16:52:11
         compiled from "tpl_web/templates\log_in.tpl" */ ?>
<?php /*%%SmartyHeaderCode:303904f62dc7474dbd1-35814597%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'a2aad6cfec800814f6854564cea8e71dc809d2eb' => 
    array (
      0 => 'tpl_web/templates\\log_in.tpl',
      1 => 1332147124,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '303904f62dc7474dbd1-35814597',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_4f62dc747bc2d2_74753349',
  'variables' => 
  array (
    'error' => 0,
    'er' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_4f62dc747bc2d2_74753349')) {function content_4f62dc747bc2d2_74753349($_smarty_tpl) {?><script type="text/javascript" src="tpl_web/js/jquery.js";></script>
<script type="text/javascript">

function check_name(){
	var name;
	name=$("#name").val();
	if(name==''){
		alert("用户名不能为空");
		$("#name").focus();
	}
	else
	{
		var patt=new RegExp();
		patt=/\W/;
		if(patt.test(name)){
			alert("用户名只能包含数字字母和下划线！");
		}
		//else
		//{
			//$.post("modules/web/ajax.php?do=check_username","username="+name,function(date){
				//if(date==0)
				//{
				//	alert(name+"尚未注册！请先注册");
				//}
			//});
		//}
	}

}
</script>
<?php echo $_smarty_tpl->getSubTemplate ("header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<?php if ($_smarty_tpl->tpl_vars['error']->value!=''){?>
	<?php  $_smarty_tpl->tpl_vars['er'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['er']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['error']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['er']->key => $_smarty_tpl->tpl_vars['er']->value){
$_smarty_tpl->tpl_vars['er']->_loop = true;
?>
	错误：<?php echo $_smarty_tpl->tpl_vars['er']->value;?>

	<?php } ?>
<?php }?>
<form action="web.php?do=log_in"  method="post">
用户名：<input type="text" id="name" name="name" onblur="check_name()"/><br/>
密码：<input type="password" id="pwd" name="password"/><br/>
<input type="submit" value="登陆"> 
</form>
<?php echo $_smarty_tpl->getSubTemplate ("footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
<?php }} ?>